package com.bean;

import com.utils.DateUtils;

import java.util.Date;

/**
 * @author Administrator
 */
public class Hw {
    private Integer id;

    private Integer teacherId;

    private String teacherName;

    private String title;

    private String hwAttachTitle;

    private String describe;

    private String endTime;

    private String hwAttachUrl;

    public Hw() {
    }

    public Hw(Integer teacherId, String title, String describe, Date endTime) {
        this.teacherId = teacherId;
        this.title = title;
        this.describe = describe;
        this.endTime = DateUtils.format(endTime);
    }

    @Override
    public String toString() {
        return "Hw{" +
                "id=" + id +
                ", teacherId=" + teacherId +
                ", teacherName='" + teacherName + '\'' +
                ", title='" + title + '\'' +
                ", hwAttachTitle='" + hwAttachTitle + '\'' +
                ", describe='" + describe + '\'' +
                ", endTime='" + endTime + '\'' +
                ", hwAttachUrl='" + hwAttachUrl + '\'' +
                '}';
    }

    public String getHwAttachUrl() {
        return hwAttachUrl;
    }

    public void setHwAttachUrl(String hwAttachUrl) {
        if (hwAttachUrl != null) {
            this.hwAttachUrl = "*";
        }
    }

    public String getHwAttachTitle() {
        return hwAttachTitle;
    }

    public void setHwAttachTitle(String hwAttachTitle) {
        this.hwAttachTitle = hwAttachTitle;
    }

    public Integer getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Integer teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public Date getEndTime() {
        return DateUtils.parse(endTime);
    }

    public void setEndTime(Date endTime) {
        this.endTime = DateUtils.format(endTime);
    }

}